<style type="text/css">
.CodeMirror{border:1px solid #ccc;{$_rs.form_style};}
.CodeMirror-scroll{width:{$_rs.width};height:{$_rs.height};}
</style>
<table cellpadding="0" cellspacing="0" style="width:100%;height:auto;border:0;" border="0">
<tr>
	<td><textarea id="{$_rs.identifier}" name="{$_rs.identifier}">{$_rs.content}</textarea></td>
</tr>
</table>
<script type="text/javascript">
var code_editor_{$_rs.identifier};
$(document).ready(function(){
	var delay;
	code_editor_{$_rs.identifier} = CodeMirror.fromTextArea(document.getElementById("{$_rs.identifier}"),{
		lineNumbers		: true,
		matchBrackets	: true,
		lineWrapping	: true,
		indentWithTabs	: true,
		indentUnit		: 4
	});
	code_editor_{$_rs.identifier}.on("change",function(obj){
		$("#{$_rs.identifier}").val(obj.getValue());
	});
});
</script>